package interface_01;

public class Pet {
    //名字
    private String name;
    //年龄
    private int age;
    //种类
    private String kind;

    public Pet(){}

    public Pet(String name,int age,String kind){
        this.name= name;
        this.age = age;
        this.kind = kind;
    }
    // 取值器、赋值器
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void print(){
        System.out.println("名叫"+this.name+"的"+this.kind+",今年"+this.age+"岁.");
    }
}
